package pattern.decorator;

public class Bacon extends Garnish{
    public Bacon(FastFood fastFood) {
        super("培根", 2, fastFood);
    }

    @Override
    public float cost() {
        return getFastFood().cost() + getPrice();
    }

    @Override
    public String getDesc() {
        return super.getDesc() + getFastFood().getDesc();
    }
}
